// 1.下载vue-router
//2.导入
import VueRouter from 'vue-router'
//3.注册
import Vue from 'vue'
Vue.use(VueRouter)
//4.准备页面组件
//5.创建路由规则
import One from '../views/One.vue'
import Two from '../views/Two.vue'
import Three from '../views/Three.vue'
import Four from '../views/Four.vue'
import Five from '../views/Five.vue'
import Six from '../views/Six.vue'
import Seven from '../views/Seven.vue'
import Eight from '../views/Eight.vue'
import Nine from '../views/Nine.vue'
import NotFound from '../views/NotFound.vue'
const routes = [{
    path:'/',
    redirect:'/one',
},{
    path:'/one',
    component:One,
},{
    path:'/two',
    component:Two,
},{
    path:'/three',
    component:Three,
},{
    path:'/four',
    component:Four,
},{
    path:'/five',
    component:Five,
},{
    path:'/six',
    component:Six,
},{
    path:'/seven',
    component:Seven,
},{
    path:'/eight',
    component:Eight,
},{
    path:'/nine',
    component:Nine,
},{
    path:'*',
    component:NotFound
}]
//6.创建路由对象
const router = new VueRouter({
    routes,
    mode:'history'
})

//导出
export default router